There are numerous available data sources that provide structured records in which each record contains named fields. Such data sources might be a database, a web service, or the like. For any given data source, a schema defines the structure for the data contained in that data source. In order to obtain information from a data source, a query is submitted to the data source, wherein the query is bound to the data source's schema. Query results are provided by a data source in response to a query.
Syntactically identical data sources share the same schemas, query structures, and results formats. Semantically identical data sources may not share the same schema, but the fields of the data source are trivially converted between data sources by, for example, simply renaming of the fields. For instance, one data source may have a field called “Name” which includes a full name, wherein another data source may have a field called “FullName” which also includes a full name.
Semantically similar data sources have at least some fields which are only loosely related in which they contain the same information, but not the same schema that defines the structure of that information. For instances, fields that serve a similar function may have different name and value ranges. For instance, one data source might contain a field “Customer Name” and another data source contains similar information but divided amongst two fields called “FirstName” and “LastName”. As another example, one data source might contain fields called “StreetAddress”, “Town”, “State”, and “Country” while another data source consolidates the information into a field called “Address”.
Often, a query structured to obtain information from one data source is targeted instead at another data source. Accordingly, there are conventional mechanisms that convert queries and results between data sources that are not syntactically identical. For instance, one conventional solution converts queries and results between syntactically identical or semantically identical sources, but does not allow for more expressive conversions necessary for data sources which are only semantically similar.
In addressing query and result conversion for data sources that are only semantically similar, the approach has been to hard code conversions, by drafting code that is tailored specifically to conversions between specific data sources, and for specific fields.